from odoo import fields, models, api
from odoo.exceptions import UserError


class RPWebArticleIndustry(models.Model):
    _name = 'rp.web.article.industry'
    _description = "文章行业"
    _rec_name = "name"
    _sql_constraints = [('unique_name', 'UNIQUE(name)', '名称重复')]

    name = fields.Char(string='名称', index=True, copy=False, required=True, translate=True)
    desc = fields.Text(string='描述')

    active = fields.Boolean(string='有效', default=True)
